<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Connect</title>
</head>

<?php
$conn=mysql_connect("localhost", "root", "") or die("can't connect database");
mysql_select_db("demo",$conn);
mysql_query("SET NAMES UTF8",$conn);
$sql="select * from user";
$query=mysql_query($sql);
if(mysql_num_rows($query) == 0)
{
	echo "Chua co du lieu";
}
else
{	
	echo "<table border='1px' align='center'>"; 
	echo "<th> ID </th>";
	echo "<th> Họ tên </th>";
	echo "<th> Số ĐT </th>";
	echo "<th> Ngày sinh </th>";
	echo "<th> Email </th>";
	while($row=mysql_fetch_array($query))
	{
   		
          
         echo "<tr>";
     	 echo "<td>".$row["id"]."</td> <br/>";
		 echo "<td>".$row["hoten"]."</td> <br/>";
		 	 
		
		 echo "<td>".$row["sodt"]. "</td> <br/>";
		 
		 echo "<td>".$row["ngaysinh"]."</td> <br />"; 
		
	 
		echo "<td>".$row["email"]."</td> <br />"; 
		echo "</tr>";
		
	}
	echo "</table>";
}
mysql_close($conn);
?>
<body>
</body>
</html>